<?php include 'session.php'?>

<?php
$id = $_REQUEST['id'];
?>

<?php include 'addproduct.php'?>
<?php include 'header.php'?>

<div id="Main">
    <div id="Content">
		<section>
			<article>
				<header class="row">
<?php
$p = $soap->call ($session_id, 'catalog_product.info', $id);
echo "<h2>".$p['name']."</h2>";
$img_product = $soap->call ($session_id, 'catalog_product_attribute_media.list', $id);
?>
				</header>
				<form action="" method="post">
					<div class="row" style="float:left">
						<div style="width:100px; height:100px; float:left"><img src="<?php echo $img_product[0]['url'];?>" width="100" height="100"/></div>
						<div style="float:left; margin-left:10px">
							Detail: <?php echo $p['description'];?>
							<p>
							Price: $<?php echo number_format($p['price'], 2, '.', ',');?>
							</p>
							<p style="margin-top:10px">
							Quantity: <input type="text" name="qty" size="5" maxlength="5" value="1"/>
							</p>
							<ul class="buttons">
								<li style="float:left">
								<input type="button" value="Back" onclick="javascript:history.go(-1);" class="button-secondary" /></li>
								<li style="float:left; margin-left:10px">
								<input type="submit" value="Add to Cart" name="submit" class="button-secondary" /></li>
							</ul>
						</div>
					</div>
				</form>
			</article>
		</section>
	</div>

<?php include 'footer.php'?>